package com.baizhi.action;

import com.baizhi.entity.Users;
import com.baizhi.service.UsersService;
import com.baizhi.service.impl.UsersServiceImpl;
import com.opensymphony.xwork2.ActionContext;

public class UsersAction {
	private Users users;
	private UsersService us=new UsersServiceImpl();
	public String login(){
		Users u = us.login(users);
		if(u!=null){
			ActionContext.getContext().getSession().put("users", u);
			return "success";
		}else{
			return "error";
		}
	}
	public Users getUsers() {
		return users;
	}
	public void setUsers(Users users) {
		this.users = users;
	}
	public UsersService getUs() {
		return us;
	}
	public void setUs(UsersService us) {
		this.us = us;
	}
}
